﻿using System.Windows.Input;
using Flux.Editor.Messaging;
using Flux.Mvvm.Commands;
using Flux.Mvvm.ViewModels;

namespace Flux.Editor.ViewModels
{
	public class StartPageViewModel
		: ViewModel
	{
		#region Commands

		public ICommand NewProjectCommand { get; set; }
		public ICommand OpenProjectCommand { get; set; }

		#endregion

		#region Initialization

		public StartPageViewModel()
		{
			RegisterCommands();
		}

		private void RegisterCommands()
		{
			NewProjectCommand = new DelegateCommand(NewProject);
			OpenProjectCommand = new DelegateCommand(OpenProject);
		}

		#endregion

		#region Project Actions

		public void NewProject(object message = null)
		{
			App.Messenger.Send(Tokens.NewProject, this);
		}

		public void OpenProject(object message = null)
		{
			App.Messenger.Send(Tokens.OpenProject, this);
		}

		#endregion
	}
}